package com.mandao.oneplat.boot.support;

import org.slf4j.helpers.FormattingTuple;
import org.slf4j.helpers.MessageFormatter;

public final class OneExceptionFactory {

    public static void throwe(Class<? extends Throwable> clazz, String message, Object... params) throws Throwable {
        FormattingTuple ft = MessageFormatter.arrayFormat(message, params);
        throw clazz.getConstructor(String.class).newInstance(ft.getMessage());
    }
}
